package com.burgeon.backend.SHOPBACKEND.service;

import com.burgeon.backend.SHOPBACKEND.entity.Article;
import com.burgeon.backend.SHOPBACKEND.entity.Media;
import com.burgeon.backend.SHOPBACKEND.entity.NewsItem;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.ArrayList;
import java.util.List;

public interface MessageNewsService  {

    //删除图文
    void deleteNews(String account,String media_id) throws UnsupportedEncodingException;

    //修改图文
    void updateNews(Article articles, String account,String media_id,String index) throws UnsupportedEncodingException;

    //获取图文素材列表
    ArrayList<NewsItem> getNews(String account) throws UnsupportedEncodingException;

    //永久素材上传media_id和URL
    Media addMaterial(MultipartFile img, String account);

    //群发图文（部分）
    String sendNewsByOpenIds(List<String> openIds, String media_id, String account) throws UnsupportedEncodingException;

    //发送全部
    String sendNewsAll(String media_id,String account) throws UnsupportedEncodingException;

    //上唇永久图文素材
    String postNews(Article[] articles, String account) throws UnsupportedEncodingException;

    //上传图片返回url
    String postImg(MultipartFile img, String account);
}
